package com.rentplant.service.impl;

import com.alibaba.fastjson.JSONObject;
import com.rentplant.Pojo.itemcollect;
import com.rentplant.Pojo.itemcollectanduser;
import com.rentplant.mapper.itemCollectMapper;
import com.rentplant.service.itemCollectService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class itemCollectServiceImp implements itemCollectService {
    @Autowired
    private itemCollectMapper itemcollectmapper;


    @Override
    //查找是否收藏物品
    public List<itemcollect> itemCollect(JSONObject iteminfo){
        return itemcollectmapper.itemCollect(iteminfo);
    }

    //收藏物品
    @Override
    public boolean addItemCollect(JSONObject iteminfo){
        return itemcollectmapper.addItemCollect(iteminfo);
    }

    //取消物品收藏
    @Override
    public boolean delItemCollect(JSONObject iteminfo){
        return itemcollectmapper.delItemCollect(iteminfo);
    }

    @Override
    //展示用户收藏
    public List<itemcollectanduser> showItemCollect(JSONObject userinfo) {
        return itemcollectmapper.showItemCollect(userinfo);
    }

}
